package com.byxy.shop.controller.admin;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.byxy.shop.entity.Carousel;
import com.byxy.shop.service.CarouselService;

import lombok.extern.slf4j.Slf4j;

@Controller
@RequestMapping("/admin")
@Slf4j
public class CarouselController {
	
	@Autowired
	private CarouselService carouselService; 

	@GetMapping("/carousels")
	public String carouselPage() {
		return "admin/newbee_mall_carousel";
	}
	
	/**
     * 列表
     */
    @RequestMapping(value = "/carousels/list", method = RequestMethod.GET)
    @ResponseBody
	public String list(@RequestParam Map<String, Object> params,Integer rows,Integer currPage) {
    	log.info("rows=" + rows);
    	
		return null;
    }
    
    /**
     * 添加
     */
    @RequestMapping(value = "/carousels/save", method = RequestMethod.POST)
    @ResponseBody
    public Map<String,String> save(@RequestBody Carousel carousel) {
    	Map<String,String> result = new HashMap<>();
    	
    	return result;
    }
}
